{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sample data generated and saved to 'data.csv'\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from faker import Faker\n",
    "\n",
    "# Initialize Faker\n",
    "fake = Faker()\n",
    "\n",
    "# Generate sample data\n",
    "num_samples = 100000  # Adjust the number of samples as needed\n",
    "data = {\n",
    "    'ID': range(1, num_samples + 1),\n",
    "    'Name': [fake.name() for _ in range(num_samples)],\n",
    "    'Age': np.random.randint(20, 60, size=num_samples),\n",
    "    'Salary': np.random.randint(30000, 100000, size=num_samples),\n",
    "    'Department': np.random.choice(['Sales', 'Engineering', 'HR', 'Marketing'], size=num_samples),\n",
    "    'JoinDate': [fake.date_between(start_date='-5y', end_date='today') for _ in range(num_samples)],\n",
    "    'PerformanceScore': np.random.choice(['Excellent', 'Good', 'Average', 'Poor'], size=num_samples),\n",
    "    'Target': np.random.choice([0, 1], size=num_samples)\n",
    "}\n",
    "\n",
    "# Create DataFrame\n",
    "df = pd.DataFrame(data)\n",
    "\n",
    "# Save to CSV\n",
    "df.to_csv('data.csv', index=False)\n",
    "\n",
    "print(\"Sample data generated and saved to 'data.csv'\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "llm-learning",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
